package com.wondersgroup.fjzlpt.console.controller.view;

import com.alibaba.fastjson.JSONObject;
import com.quick.framework.boot.web.wapper.QuickPrincipal;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class IndexController {
	@RequestMapping("/")
	public String index(HttpServletRequest request)
	{
		QuickPrincipal principal = (QuickPrincipal)request.getUserPrincipal();
		JSONObject roleInfo = principal.getRoleInfo();
		JSONObject userInfo = principal.getUserInfo();
		request.setAttribute("roleInfo", roleInfo);
		request.setAttribute("userInfo", userInfo);
		return "index";
	}
}
